﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace NDLS.WebApi.Model;

public partial class NdlsContext : DbContext
{
    public NdlsContext()
    {
    }

    public NdlsContext(DbContextOptions<NdlsContext> options)
        : base(options)
    {
    }

    public virtual DbSet<AnswerInfo> AnswerInfos { get; set; }

    public virtual DbSet<AnswerSheet> AnswerSheets { get; set; }

    public virtual DbSet<BaseCourse> BaseCourses { get; set; }

    public virtual DbSet<Calendar> Calendars { get; set; }

    public virtual DbSet<Certificate> Certificates { get; set; }

    public virtual DbSet<CertificateHi> CertificateHis { get; set; }

    public virtual DbSet<ChinaRegion> ChinaRegions { get; set; }

    public virtual DbSet<Class> Classes { get; set; }

    public virtual DbSet<ClassBegin> ClassBegins { get; set; }

    public virtual DbSet<ClassStudent> ClassStudents { get; set; }

    public virtual DbSet<Course> Courses { get; set; }

    public virtual DbSet<CourseMaterial> CourseMaterials { get; set; }

    public virtual DbSet<CoursePoint> CoursePoints { get; set; }

    public virtual DbSet<CourseRegistration> CourseRegistrations { get; set; }

    public virtual DbSet<DetailPlan> DetailPlans { get; set; }

    public virtual DbSet<ExerciseScore> ExerciseScores { get; set; }

    public virtual DbSet<ExerciseScoreRatio> ExerciseScoreRatios { get; set; }

    public virtual DbSet<Interviewee> Interviewees { get; set; }

    public virtual DbSet<News> News { get; set; }

    public virtual DbSet<Order> Orders { get; set; }

    public virtual DbSet<Paper> Papers { get; set; }

    public virtual DbSet<PaperSection> PaperSections { get; set; }

    public virtual DbSet<PersonAttendance> PersonAttendances { get; set; }

    public virtual DbSet<PersonPaper> PersonPapers { get; set; }

    public virtual DbSet<PlanPaper> PlanPapers { get; set; }

    public virtual DbSet<PlanPaperStuHi> PlanPaperStuHis { get; set; }

    public virtual DbSet<Point> Points { get; set; }

    public virtual DbSet<PointDetail> PointDetails { get; set; }

    public virtual DbSet<Question> Questions { get; set; }

    public virtual DbSet<QuestionPoint> QuestionPoints { get; set; }

    public virtual DbSet<QuestionTag> QuestionTags { get; set; }

    public virtual DbSet<QusetionImage> QusetionImages { get; set; }

    public virtual DbSet<Refreshtoken> Refreshtokens { get; set; }

    public virtual DbSet<Section> Sections { get; set; }

    public virtual DbSet<SectionQuestion> SectionQuestions { get; set; }

    public virtual DbSet<Skill> Skills { get; set; }

    public virtual DbSet<SkillPoint> SkillPoints { get; set; }

    public virtual DbSet<SmMenu> SmMenus { get; set; }

    public virtual DbSet<SmOption> SmOptions { get; set; }

    public virtual DbSet<SmPerson> SmPeople { get; set; }

    public virtual DbSet<SmPersonRole> SmPersonRoles { get; set; }

    public virtual DbSet<SmRole> SmRoles { get; set; }

    public virtual DbSet<SmRoleMenu> SmRoleMenus { get; set; }

    public virtual DbSet<Tag> Tags { get; set; }

    public virtual DbSet<TeachPlan> TeachPlans { get; set; }

    public virtual DbSet<TeachPractice> TeachPractices { get; set; }

    public virtual DbSet<TeacherPoint> TeacherPoints { get; set; }

    public virtual DbSet<TestTable> TestTables { get; set; }

    public virtual DbSet<TotalScore> TotalScores { get; set; }

    public virtual DbSet<TotalScoreRatio> TotalScoreRatios { get; set; }

    public virtual DbSet<UnivAttn> UnivAttns { get; set; }

    public virtual DbSet<UnivCollege> UnivColleges { get; set; }

    public virtual DbSet<UnivCoop> UnivCoops { get; set; }

    public virtual DbSet<UnivCoopAttn> UnivCoopAttns { get; set; }

    public virtual DbSet<UnivCoopHistory> UnivCoopHistories { get; set; }

    public virtual DbSet<UnivWorkHist> UnivWorkHists { get; set; }

    public virtual DbSet<University> Universities { get; set; }

    public virtual DbSet<UserPaperAnswer> UserPaperAnswers { get; set; }

    public virtual DbSet<UserPaperQuestionSeq> UserPaperQuestionSeqs { get; set; }

    public virtual DbSet<Verifycode> Verifycodes { get; set; }

    public virtual DbSet<VideoCourse> VideoCourses { get; set; }

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        => optionsBuilder.UseMySql("server=localhost;user id=root;password=whx1004;database=ndls", Microsoft.EntityFrameworkCore.ServerVersion.Parse("5.7.26-mysql"));

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder
            .UseCollation("utf8mb4_general_ci")
            .HasCharSet("utf8mb4");

        modelBuilder.Entity<AnswerInfo>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("answer_info", tb => tb.HasComment("答卷情况表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => new { e.UserId, e.PlanId, e.PaperId }, "idx_answer_info").IsUnique();

            entity.Property(e => e.CostTime)
                .HasDefaultValueSql("'00:00:00'")
                .HasComment("目前答卷耗费时长（00：09：30）")
                .HasColumnType("time")
                .HasColumnName("cost_time");
            entity.Property(e => e.EndTime)
                .HasMaxLength(20)
                .HasComment("答卷结束时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("end_time");
            entity.Property(e => e.FinishFlag)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("是否完成答卷标志位（0-未完成，1-已完成）")
                .HasColumnName("finish_flag");
            entity.Property(e => e.JudgePerson)
                .HasMaxLength(20)
                .HasComment("判卷人（系统或人）")
                .HasColumnName("judge_person");
            entity.Property(e => e.JudgeTime)
                .HasMaxLength(20)
                .HasComment("判卷时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("judge_time");
            entity.Property(e => e.LeaveLimit)
                .HasComment("离开次数")
                .HasColumnName("leave_limit");
            entity.Property(e => e.PaperId)
                .HasComment("试卷ID")
                .HasColumnName("paper_id");
            entity.Property(e => e.PassFlag)
                .HasDefaultValueSql("'0'")
                .HasComment("考试通过标志（0-未通过，1-通过）")
                .HasColumnName("pass_flag");
            entity.Property(e => e.PlanId).HasColumnName("plan_id");
            entity.Property(e => e.Score)
                .HasComment("考生答卷总得分")
                .HasColumnType("float(5,2)")
                .HasColumnName("score");
            entity.Property(e => e.StartTime)
                .HasMaxLength(20)
                .HasComment("答卷开始时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("start_time");
            entity.Property(e => e.UserId)
                .HasComment("考生ID")
                .HasColumnName("user_id");
            entity.Property(e => e.UserType)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("考生类型（1-招生模块，2-教学模块）不同类型，对应不同的人员表")
                .HasColumnName("user_type");
        });

        modelBuilder.Entity<AnswerSheet>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("answer_sheet", tb => tb.HasComment("答题卡"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => new { e.PaperId, e.PlanId, e.QuestionId, e.UserId }, "idx_answer_sheet").IsUnique();

            entity.Property(e => e.Answer)
                .HasMaxLength(15000)
                .HasComment("考生答案（多选题和多空填空题，答案之间使用#$#来分隔）")
                .HasColumnName("answer");
            entity.Property(e => e.AnswerTime)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("答题时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("answer_time")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.JudgePerson)
                .HasMaxLength(20)
                .HasComment("阅卷人（系统或人）")
                .HasColumnName("judge_person");
            entity.Property(e => e.JudgeTime)
                .HasMaxLength(20)
                .HasComment("阅卷时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("judge_time");
            entity.Property(e => e.PaperId)
                .HasComment("试卷ID")
                .HasColumnName("paper_id");
            entity.Property(e => e.PlanId).HasColumnName("plan_id");
            entity.Property(e => e.QuestionId)
                .HasComment("题目ID")
                .HasColumnName("question_id");
            entity.Property(e => e.Remark)
                .HasMaxLength(1000)
                .HasComment("备注")
                .HasColumnName("remark")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Score)
                .HasDefaultValueSql("'0.00'")
                .HasComment("考生此题得分")
                .HasColumnType("float(5,2)")
                .HasColumnName("score");
            entity.Property(e => e.UserId)
                .HasComment("考生ID")
                .HasColumnName("user_id");
            entity.Property(e => e.UserType)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("考生类型（1-招生模块，2-教学模块），不同类型，对应不同的人员表")
                .HasColumnName("user_type");
        });

        modelBuilder.Entity<BaseCourse>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("base_course")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.Address)
                .HasMaxLength(255)
                .HasComment("基地地址")
                .HasColumnName("address");
            entity.Property(e => e.AddressEnUs)
                .HasMaxLength(255)
                .HasComment("基地地址en_US")
                .HasColumnName("address_en_US");
            entity.Property(e => e.AddressZhTw)
                .HasMaxLength(255)
                .HasComment("基地地址zh_TW")
                .HasColumnName("address_zh_TW");
            entity.Property(e => e.Area)
                .HasMaxLength(255)
                .HasComment("区域")
                .HasColumnName("area");
            entity.Property(e => e.AreaEnUs)
                .HasMaxLength(255)
                .HasComment("区域en_US")
                .HasColumnName("area_en_US");
            entity.Property(e => e.AreaZhTw)
                .HasMaxLength(255)
                .HasComment("区域zh_TW")
                .HasColumnName("area_zh_TW");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(255)
                .HasComment("创建时间")
                .HasColumnName("createTime");
            entity.Property(e => e.Creator)
                .HasMaxLength(50)
                .HasComment("创建人")
                .HasColumnName("creator");
            entity.Property(e => e.Del)
                .HasComment("是否删除")
                .HasColumnName("del");
            entity.Property(e => e.Describe)
                .HasMaxLength(2000)
                .HasComment("描述")
                .HasColumnName("describe");
            entity.Property(e => e.DescribeEnUs)
                .HasMaxLength(255)
                .HasComment("描述en_US")
                .HasColumnName("describe_en_US");
            entity.Property(e => e.DescribeZhTw)
                .HasMaxLength(255)
                .HasComment("描述zh_TW")
                .HasColumnName("describe_zh_TW");
            entity.Property(e => e.No)
                .HasComment("基地代码")
                .HasColumnName("no");
            entity.Property(e => e.PersonId)
                .HasComment("基地管理员")
                .HasColumnName("personId");
            entity.Property(e => e.Remark)
                .HasMaxLength(4000)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.TrainingBase)
                .HasMaxLength(255)
                .HasComment("培训基地")
                .HasColumnName("trainingBase");
            entity.Property(e => e.TrainingBaseEnUs)
                .HasMaxLength(255)
                .HasComment("培训基地en_US")
                .HasColumnName("trainingBase_en_US");
            entity.Property(e => e.TrainingBaseZhTw)
                .HasMaxLength(255)
                .HasComment("培训基地zh_TW")
                .HasColumnName("trainingBase_zh_TW");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(255)
                .HasComment("更新时间")
                .HasColumnName("updateTime");
            entity.Property(e => e.Updator)
                .HasMaxLength(50)
                .HasComment("更新人")
                .HasColumnName("updator");
        });

        modelBuilder.Entity<Calendar>(entity =>
        {
            entity.HasKey(e => e.Date).HasName("PRIMARY");

            entity
                .ToTable("calendar")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Date)
                .HasMaxLength(8)
                .HasDefaultValueSql("''")
                .HasColumnName("date");
            entity.Property(e => e.Comment)
                .HasMaxLength(60)
                .HasColumnName("comment");
            entity.Property(e => e.Holiday)
                .HasMaxLength(1)
                .HasDefaultValueSql("''")
                .HasColumnName("holiday");
        });

        modelBuilder.Entity<Certificate>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("certificate")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.CertificateNumber, "idx_certificateno").IsUnique();

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.CertificateNumber)
                .HasMaxLength(50)
                .HasComment("证书号")
                .HasColumnName("certificateNumber");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(255)
                .HasComment("创建时间")
                .HasColumnName("createTime");
            entity.Property(e => e.Creator)
                .HasMaxLength(50)
                .HasComment("创建人")
                .HasColumnName("creator");
            entity.Property(e => e.Del)
                .HasComment("是否删除")
                .HasColumnName("del");
            entity.Property(e => e.EnrollId)
                .HasComment("报名ID")
                .HasColumnName("enrollId");
            entity.Property(e => e.History)
                .HasMaxLength(255)
                .HasColumnName("history");
            entity.Property(e => e.Path)
                .HasMaxLength(512)
                .HasComment("路径")
                .HasColumnName("path");
            entity.Property(e => e.Remark)
                .HasMaxLength(4000)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.State)
                .HasComment("证书状态（0-申请中  1-基地管理员审核 2-中心管理员审核）")
                .HasColumnName("state");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(255)
                .HasComment("更新时间")
                .HasColumnName("updateTime");
            entity.Property(e => e.Updator)
                .HasMaxLength(50)
                .HasComment("更新人")
                .HasColumnName("updator");
        });

        modelBuilder.Entity<CertificateHi>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("certificate_his")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.Property(e => e.Id)
                .HasComment("id")
                .HasColumnName("id");
            entity.Property(e => e.Address)
                .HasMaxLength(255)
                .HasComment("基地地址")
                .HasColumnName("address")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.BaseNo)
                .HasMaxLength(20)
                .HasComment("基地代码")
                .HasColumnName("base_no")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.CertificateNumber)
                .HasMaxLength(40)
                .HasComment("证书编号")
                .HasColumnName("certificate_number")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Course)
                .HasMaxLength(100)
                .HasComment("课程名称")
                .HasColumnName("course")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Email)
                .HasMaxLength(200)
                .HasComment("邮箱")
                .HasColumnName("email")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.EndTime)
                .HasMaxLength(40)
                .HasComment("开课结束日期")
                .HasColumnName("end_time")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.History)
                .HasComment("是否是历史数据1-是，0-否")
                .HasColumnName("history");
            entity.Property(e => e.Path)
                .HasMaxLength(255)
                .HasComment("证书路径")
                .HasColumnName("path")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Periods)
                .HasMaxLength(20)
                .HasComment("期数")
                .HasColumnName("periods")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Pinyin)
                .HasMaxLength(40)
                .HasComment("姓名拼音")
                .HasColumnName("pinyin")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Seq)
                .HasMaxLength(10)
                .HasComment("学员序号")
                .HasColumnName("seq")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.StartTime)
                .HasMaxLength(40)
                .HasComment("开课开始日期")
                .HasColumnName("start_time")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.State)
                .HasMaxLength(2)
                .HasComment("证书状态")
                .HasColumnName("state")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.TrainingBase)
                .HasMaxLength(255)
                .HasComment("基地名称")
                .HasColumnName("training_base")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.UserName)
                .HasMaxLength(40)
                .HasComment("用户姓名")
                .HasColumnName("user_name")
                .UseCollation("utf8mb3_unicode_ci");
        });

        modelBuilder.Entity<ChinaRegion>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("china_regions")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.Property(e => e.Id)
                .HasComment("县及县以上行政区划代码表")
                .HasColumnName("ID");
            entity.Property(e => e.Code)
                .HasMaxLength(11)
                .HasComment("区域代码")
                .HasColumnName("CODE")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Name)
                .HasMaxLength(50)
                .HasComment("区域名称")
                .HasColumnName("NAME")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.ParentId)
                .HasMaxLength(11)
                .HasComment("父级区域代码")
                .HasColumnName("PARENT_ID")
                .UseCollation("utf8mb3_unicode_ci");
            entity.Property(e => e.Status)
                .HasDefaultValueSql("'0'")
                .HasComment("开通状态,默认值0:开通，1：不开通")
                .HasColumnName("STATUS");
        });

        modelBuilder.Entity<Class>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("class")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CourseId)
                .HasComment("课程ID")
                .HasColumnName("courseId");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(600)
                .HasComment("考场描述")
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(800)
                .HasComment("考场描述英文")
                .HasColumnName("description_en_US");
            entity.Property(e => e.DescriptionZhTw)
                .HasMaxLength(600)
                .HasComment("考场描述繁体")
                .HasColumnName("description_zh_TW");
            entity.Property(e => e.Direction)
                .HasMaxLength(100)
                .HasColumnName("direction");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasColumnName("enable");
            entity.Property(e => e.Location)
                .HasMaxLength(100)
                .HasColumnName("location");
            entity.Property(e => e.MakeupClassId)
                .HasComment("补考的考场ID")
                .HasColumnName("makeup_class_id");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .HasComment("考场名")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(100)
                .HasComment("考场名英文")
                .HasColumnName("name_en_US");
            entity.Property(e => e.NameZhTw)
                .HasMaxLength(100)
                .HasComment("考场名繁体")
                .HasColumnName("name_zh_TW");
            entity.Property(e => e.No)
                .HasMaxLength(20)
                .HasColumnName("no");
            entity.Property(e => e.Property)
                .HasComment("考场属性（0-正常考场，1-补考考场）")
                .HasColumnName("property");
            entity.Property(e => e.Session)
                .HasMaxLength(50)
                .HasColumnName("session");
            entity.Property(e => e.SessionEnUs)
                .HasMaxLength(80)
                .HasColumnName("session_en_US");
            entity.Property(e => e.SessionZhTw)
                .HasMaxLength(50)
                .HasColumnName("session_zh_TW");
            entity.Property(e => e.Size).HasColumnName("size");
            entity.Property(e => e.StudentMonitor)
                .HasComment("班长")
                .HasColumnName("student_monitor");
            entity.Property(e => e.TeacherMonitor)
                .HasComment("班主任")
                .HasColumnName("teacher_monitor");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<ClassBegin>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("class_begins")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.BaseId)
                .HasComment("基地id")
                .HasColumnName("baseId");
            entity.Property(e => e.CourseId)
                .HasComment("课程Id")
                .HasColumnName("courseId");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(255)
                .HasComment("创建时间")
                .HasColumnName("createTime");
            entity.Property(e => e.Creator)
                .HasMaxLength(50)
                .HasComment("创建人")
                .HasColumnName("creator");
            entity.Property(e => e.Del)
                .HasComment("是否删除")
                .HasColumnName("del");
            entity.Property(e => e.EndTime)
                .HasMaxLength(255)
                .HasComment("课程结束时间")
                .HasColumnName("endTime");
            entity.Property(e => e.Periods)
                .HasMaxLength(4)
                .HasComment("期数")
                .HasColumnName("periods");
            entity.Property(e => e.Remark)
                .HasMaxLength(4000)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.StartTime)
                .HasMaxLength(255)
                .HasComment("课程开始时间")
                .HasColumnName("startTime");
            entity.Property(e => e.TeacherId)
                .HasMaxLength(200)
                .HasComment("导师\"编号-导师Id\"")
                .HasColumnName("teacherId");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(255)
                .HasComment("更新时间")
                .HasColumnName("updateTime");
            entity.Property(e => e.Updator)
                .HasMaxLength(50)
                .HasComment("更新人")
                .HasColumnName("updator");
        });

        modelBuilder.Entity<ClassStudent>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("class_student")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.ClassId, "class_id");

            entity.HasIndex(e => e.StudentId, "student_id");

            entity.Property(e => e.ClassId).HasColumnName("class_id");
            entity.Property(e => e.StudentId).HasColumnName("student_id");

            entity.HasOne(d => d.Class).WithMany()
                .HasForeignKey(d => d.ClassId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("class_student_ibfk_1");

            entity.HasOne(d => d.Student).WithMany()
                .HasForeignKey(d => d.StudentId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("class_student_ibfk_2");
        });

        modelBuilder.Entity<Course>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("course")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.ActBookAvl)
                .HasMaxLength(2)
                .HasComment("实验手册是否可得 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))")
                .HasColumnName("act_book_avl");
            entity.Property(e => e.Category)
                .HasMaxLength(2)
                .HasComment("课程类别 CSE_TYPE（ 1-Technology 2-Business 3-Soft Skills 4-Language 5-Process 6-Certification 7-Other ）")
                .HasColumnName("category");
            entity.Property(e => e.CostNumber)
                .HasDefaultValueSql("'0.00'")
                .HasComment("课程花费")
                .HasColumnType("float(5,2)")
                .HasColumnName("cost_number");
            entity.Property(e => e.CostUnit)
                .HasMaxLength(2)
                .HasComment("课程花费单位 COST_UNIT (1-月 2-星期 3-天 4-小时 5-分钟)")
                .HasColumnName("cost_unit");
            entity.Property(e => e.CourseCardImag)
                .HasComment("课程卡片图片")
                .HasColumnType("mediumtext")
                .HasColumnName("course_card_imag");
            entity.Property(e => e.CourseContent)
                .HasComment("课程正文内容")
                .HasColumnName("course_content");
            entity.Property(e => e.CourseContentEnUs).HasColumnName("course_content_en_US");
            entity.Property(e => e.CourseContentZhTw).HasColumnName("course_content_zh_TW");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(40)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(40)
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(600)
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(800)
                .HasColumnName("description_en_US");
            entity.Property(e => e.DescriptionZhTw)
                .HasMaxLength(600)
                .HasComment("课程描述（TW）")
                .HasColumnName("description_zh_TW");
            entity.Property(e => e.Direction)
                .HasMaxLength(100)
                .HasColumnName("direction");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasColumnName("enable");
            entity.Property(e => e.ExecPfAvl)
                .HasMaxLength(2)
                .HasComment("练习平台是否提供 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))")
                .HasColumnName("exec_pf_avl");
            entity.Property(e => e.Function)
                .HasMaxLength(1000)
                .HasColumnName("function");
            entity.Property(e => e.FunctionEnUs)
                .HasMaxLength(1500)
                .HasColumnName("function_en_US")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.FunctionZhTw)
                .HasMaxLength(1000)
                .HasColumnName("function_zh_TW");
            entity.Property(e => e.Level)
                .HasMaxLength(2)
                .HasComment("课程难易度级别 CSE_DIFF (1-初级(Entry) 2-中级(Intermediate) 3-高级(Senior))")
                .HasColumnName("level");
            entity.Property(e => e.Lock)
                .HasMaxLength(2)
                .HasColumnName("lock");
            entity.Property(e => e.Name)
                .HasMaxLength(100)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(100)
                .HasColumnName("name_en_US");
            entity.Property(e => e.NameZhTw)
                .HasMaxLength(100)
                .HasComment("课程名称（TW）")
                .HasColumnName("name_zh_TW");
            entity.Property(e => e.No)
                .HasMaxLength(20)
                .HasColumnName("no");
            entity.Property(e => e.PresentationAvl)
                .HasMaxLength(2)
                .HasComment("教材讲义是否可得 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))")
                .HasColumnName("presentation_avl");
            entity.Property(e => e.Price)
                .HasMaxLength(20)
                .HasComment("课程价格")
                .HasColumnName("price");
            entity.Property(e => e.Property)
                .HasMaxLength(2)
                .HasColumnName("property");
            entity.Property(e => e.QuizAvl)
                .HasMaxLength(2)
                .HasComment("测验是否提供 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))")
                .HasColumnName("quiz_avl");
            entity.Property(e => e.StuManualAvl)
                .HasMaxLength(2)
                .HasComment("学生手册是否可得 AVL (1-提供(Available) 2-未供(Not Available) 3-未知(N/A))")
                .HasColumnName("stu_manual_avl");
            entity.Property(e => e.TargetClient)
                .HasMaxLength(200)
                .HasComment("目标客户 CLIENTS ( 如：SCBC-渣打 HSBC-汇丰 )（以字符串方式存储，使用，来分隔）")
                .HasColumnName("target_client")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Title)
                .HasMaxLength(255)
                .HasComment("标题")
                .HasColumnName("title");
            entity.Property(e => e.TitleEnUs)
                .HasMaxLength(255)
                .HasComment("标题(en)")
                .HasColumnName("title_en_US");
            entity.Property(e => e.TitleZhTw)
                .HasMaxLength(255)
                .HasComment("标题(tw)")
                .HasColumnName("title_zh_TW");
            entity.Property(e => e.TrainerAvl)
                .HasMaxLength(2)
                .HasComment("教授者是否可得 TRAINER_AVL （1-外部聘请(External) 2-内部可供(Available) 3-内部未供(Not Available)）")
                .HasColumnName("trainer_avl");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(40)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(40)
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<CourseMaterial>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("course_material")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Category)
                .HasComment("1.课程学习资料 2.课堂花絮 3.课程表")
                .HasColumnName("category");
            entity.Property(e => e.Classbeginsid).HasColumnName("classbeginsid");
            entity.Property(e => e.Courseid).HasColumnName("courseid");
            entity.Property(e => e.Createdatetime)
                .HasColumnType("datetime")
                .HasColumnName("createdatetime");
            entity.Property(e => e.Modifydatetime)
                .HasDefaultValueSql("CURRENT_TIMESTAMP")
                .HasColumnType("datetime")
                .HasColumnName("modifydatetime");
            entity.Property(e => e.Operatorid)
                .HasMaxLength(255)
                .HasColumnName("operatorid");
            entity.Property(e => e.Path)
                .HasMaxLength(255)
                .HasColumnName("path");
            entity.Property(e => e.Shortdescription)
                .HasMaxLength(1000)
                .HasColumnName("shortdescription");
            entity.Property(e => e.Title)
                .HasMaxLength(100)
                .HasColumnName("title");
            entity.Property(e => e.Type)
                .HasComment("1.mp4;2.pdf;3.jpg;4.jpeg;5.png")
                .HasColumnName("type");
        });

        modelBuilder.Entity<CoursePoint>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("course_point")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.CourseId, "course_id");

            entity.HasIndex(e => e.PointId, "point_id");

            entity.Property(e => e.CourseId).HasColumnName("course_id");
            entity.Property(e => e.PointId).HasColumnName("point_id");

            entity.HasOne(d => d.Course).WithMany()
                .HasForeignKey(d => d.CourseId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("course_point_ibfk_1");

            entity.HasOne(d => d.Point).WithMany()
                .HasForeignKey(d => d.PointId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("course_point_ibfk_2");
        });

        modelBuilder.Entity<CourseRegistration>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("course_registration")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.HasIndex(e => new { e.ClassBeginsId, e.Seq }, "classBeginsId").IsUnique();

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.Check)
                .HasComment("审核 0-未审核 1-已审核")
                .HasColumnName("check");
            entity.Property(e => e.ClassBeginsId)
                .HasComment("开课Id")
                .HasColumnName("classBeginsId");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(255)
                .HasComment("创建时间")
                .HasColumnName("createTime");
            entity.Property(e => e.Creator)
                .HasMaxLength(50)
                .HasComment("创建人")
                .HasColumnName("creator");
            entity.Property(e => e.Del)
                .HasComment("是否删除")
                .HasColumnName("del");
            entity.Property(e => e.Pay)
                .HasComment("报名课程支付信息（0-未支付，1-已支付）")
                .HasColumnName("pay");
            entity.Property(e => e.PersonId)
                .HasComment("用户Id")
                .HasColumnName("personId");
            entity.Property(e => e.Remark)
                .HasMaxLength(4000)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.Seq)
                .HasMaxLength(2)
                .HasComment("序列")
                .HasColumnName("seq");
            entity.Property(e => e.Time)
                .HasMaxLength(255)
                .HasComment("报名课程时间")
                .HasColumnName("time");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(255)
                .HasComment("更新时间")
                .HasColumnName("updateTime");
            entity.Property(e => e.Updator)
                .HasMaxLength(50)
                .HasComment("更新人")
                .HasColumnName("updator");
        });

        modelBuilder.Entity<DetailPlan>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("detail_plan")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.PointId, "point_id");

            entity.HasIndex(e => e.TeachPlanId, "teach_plan_id");

            entity.Property(e => e.Cost)
                .HasColumnType("float(5,2)")
                .HasColumnName("cost");
            entity.Property(e => e.Endtime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("endtime");
            entity.Property(e => e.FinishState)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("完成情况")
                .HasColumnName("finish_state");
            entity.Property(e => e.PointId).HasColumnName("point_id");
            entity.Property(e => e.Starttime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("starttime");
            entity.Property(e => e.TeachPlanId).HasColumnName("teach_plan_id");
            entity.Property(e => e.TeacherId)
                .HasDefaultValueSql("'0'")
                .HasColumnName("teacher_id");

            entity.HasOne(d => d.TeachPlan).WithMany()
                .HasForeignKey(d => d.TeachPlanId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("detail_plan_ibfk_1");
        });

        modelBuilder.Entity<ExerciseScore>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("exercise_score", tb => tb.HasComment("学生平时成绩明细"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键ID\r")
                .HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人\r")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)\r")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除\r")
                .HasColumnName("del");
            entity.Property(e => e.PaperId)
                .HasComment("试卷ID\r")
                .HasColumnName("paper_id");
            entity.Property(e => e.PlanId)
                .HasComment("教学计划ID\r")
                .HasColumnName("plan_id");
            entity.Property(e => e.StudentId)
                .HasComment("学生ID\r")
                .HasColumnName("student_id");
            entity.Property(e => e.SwitchScore)
                .HasComment("转换分数\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("switch_score");
            entity.Property(e => e.TrueScore)
                .HasComment("卷面分数\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("true_score");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人\r")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)\r")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<ExerciseScoreRatio>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("exercise_score_ratio", tb => tb.HasComment("平时成绩组成加权表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键ID")
                .HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除")
                .HasColumnName("del");
            entity.Property(e => e.Flag)
                .HasComment("是否为最终测验卷 0-不是 1-是")
                .HasColumnName("flag");
            entity.Property(e => e.PaperId)
                .HasComment("试卷ID")
                .HasColumnName("paper_id");
            entity.Property(e => e.PlanId)
                .HasComment("教学计划ID")
                .HasColumnName("plan_id");
            entity.Property(e => e.Ratio)
                .HasComment("加权比例")
                .HasColumnName("ratio");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<Interviewee>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("interviewee", tb => tb.HasComment("人才信息表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.Age)
                .HasComment("年龄")
                .HasColumnName("age");
            entity.Property(e => e.Birthday)
                .HasMaxLength(8)
                .HasComment("出生日期")
                .HasColumnName("birthday");
            entity.Property(e => e.Cardno)
                .HasMaxLength(18)
                .HasComment("身份证号")
                .HasColumnName("cardno");
            entity.Property(e => e.CollegeComment)
                .HasMaxLength(300)
                .HasComment("学院备注")
                .HasColumnName("college_comment")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.CollegeId)
                .HasComment("学院ID(为0表示为空)")
                .HasColumnName("college_id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("创建时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("create_time");
            entity.Property(e => e.Degree)
                .HasMaxLength(2)
                .HasComment("学历（选框已有）")
                .HasColumnName("degree");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(N-标识正在使用，Y-标识被删除)")
                .HasColumnName("del");
            entity.Property(e => e.Email)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("电子邮件")
                .HasColumnName("email");
            entity.Property(e => e.EmploymtAgreemt)
                .HasMaxLength(2)
                .HasComment("结业协议签署情况 SIGN_EPMTAGMT(1-已签署 2-未签署)")
                .HasColumnName("employmt_agreemt");
            entity.Property(e => e.EnglishLevel)
                .HasMaxLength(2)
                .HasComment("英语等级 ENG_LEVEL（0-无，1-四级,2-六级，3-专四，4-专八，5-托福，6-雅思）")
                .HasColumnName("english_level");
            entity.Property(e => e.Gender)
                .HasMaxLength(3)
                .HasDefaultValueSql("''")
                .HasComment("性别（0-女，1-男）")
                .HasColumnName("gender");
            entity.Property(e => e.GraduateMonth)
                .HasMaxLength(7)
                .HasComment("毕业年月，如 2016-07")
                .HasColumnName("graduate_month");
            entity.Property(e => e.InCompanyTime)
                .HasMaxLength(10)
                .HasComment("入职公司时间 如 2016-10-01")
                .HasColumnName("in_company_time");
            entity.Property(e => e.InProjTime)
                .HasMaxLength(10)
                .HasComment("入职项目时间 如 2016-10-01")
                .HasColumnName("in_proj_time");
            entity.Property(e => e.LeaveTime)
                .HasMaxLength(10)
                .HasComment("离职时间 如 2016-10-01")
                .HasColumnName("leave_time");
            entity.Property(e => e.Major)
                .HasMaxLength(2)
                .HasComment("所学专业 MAJOR(1-计算机科学与技术 2-软件工程 3-电子商务 4-电子信息工程 5-网络工程 6-通讯工程 7-信息系统与信息管理 8-计算机软件 9-软件服务外包 10-物联网工程)")
                .HasColumnName("major");
            entity.Property(e => e.MajorComment)
                .HasMaxLength(90)
                .HasComment("所学专业备注")
                .HasColumnName("major_comment");
            entity.Property(e => e.Mobile)
                .HasMaxLength(11)
                .HasDefaultValueSql("''")
                .HasComment("手机号码")
                .HasColumnName("mobile");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("中文名")
                .HasColumnName("name");
            entity.Property(e => e.NativePlaceCity)
                .HasMaxLength(10)
                .HasComment("户籍地址城市")
                .HasColumnName("native_place_city");
            entity.Property(e => e.NativePlaceComment)
                .HasMaxLength(90)
                .HasComment("户籍地址备注")
                .HasColumnName("native_place_comment");
            entity.Property(e => e.NativePlaceProv)
                .HasMaxLength(10)
                .HasComment("户籍地址省份")
                .HasColumnName("native_place_prov");
            entity.Property(e => e.Password)
                .HasMaxLength(50)
                .HasComment("密码")
                .HasColumnName("password");
            entity.Property(e => e.PhotoUrl)
                .HasMaxLength(100)
                .HasComment("头像存放地址")
                .HasColumnName("photo_url");
            entity.Property(e => e.Position)
                .HasMaxLength(2)
                .HasComment("岗位 POSITION（1-Java，2-MF，3-C，4-.net，5-Testing，6-BI，7-PMA，8-Ba，9-Admin，10-Other）")
                .HasColumnName("position");
            entity.Property(e => e.PositionComment)
                .HasMaxLength(255)
                .HasComment("岗位备注")
                .HasColumnName("position_comment");
            entity.Property(e => e.ProjGroup)
                .HasMaxLength(2)
                .HasComment("项目组别 PROJ_GROUP( 1-CSTC-ICG 2-CSTS-GCT-BI 3-CSTS-GCT-CBK 4-CSTS-GCT-CM 5-CSTS-GCT-CSS 6-CSTS-GCT-EBT 7-CSTS-GCT-ECS 8-CSTS-GCT-TC 9-CSTS-GCT-WM 10-SSVB 11-Sonny 12-交行 13-摩根 14-益伯睿 15-拓明 16-量子金服 17-富达 18-SCB 19-后台TCS 20-后台PD)")
                .HasColumnName("proj_group");
            entity.Property(e => e.ProjGroupComment)
                .HasMaxLength(90)
                .HasComment("项目组别描述")
                .HasColumnName("proj_group_comment");
            entity.Property(e => e.RecruitState)
                .HasMaxLength(2)
                .HasComment("招聘状态 RC_STATE（1-筛选简历不合格，2-筛选简历合格，3-未参加初试，4-参加初试，5-放弃初试，6-初试不合格，7-初试合格，8-未完善简历，9-已完善简历，10-放弃完善简历）")
                .HasColumnName("recruit_state");
            entity.Property(e => e.Remark)
                .HasMaxLength(900)
                .HasComment("备注信息")
                .HasColumnName("remark");
            entity.Property(e => e.ResumeUrl)
                .HasMaxLength(100)
                .HasComment("简历附件存放地址")
                .HasColumnName("resume_url");
            entity.Property(e => e.SpellName)
                .HasMaxLength(30)
                .HasColumnName("spell_name");
            entity.Property(e => e.StateComment)
                .HasMaxLength(2000)
                .HasComment("招聘状态说明")
                .HasColumnName("state_comment");
            entity.Property(e => e.TalentSource)
                .HasMaxLength(2)
                .HasComment("人才来源 TAL_SOURCE（1-校宣讲会，2-校招聘会，3-网络招聘，4-培训学校，5-其他途径）")
                .HasColumnName("talent_source");
            entity.Property(e => e.UnivComment)
                .HasMaxLength(300)
                .HasComment("学校备注")
                .HasColumnName("univ_comment");
            entity.Property(e => e.UnivId)
                .HasComment("学校ID(为0表示为空)")
                .HasColumnName("univ_id");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("修改时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("update_time")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Username)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("用户名")
                .HasColumnName("username");
            entity.Property(e => e.WorkLocComment)
                .HasMaxLength(90)
                .HasComment("工作地点描述")
                .HasColumnName("work_loc_comment");
            entity.Property(e => e.WorkLocation)
                .HasMaxLength(2)
                .HasComment("工作地点LOCATION")
                .HasColumnName("work_location");
        });

        modelBuilder.Entity<News>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("news")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id")
                .HasColumnName("id");
            entity.Property(e => e.IsDelete)
                .HasComment("删除标记（0-未删除，1-已删除）")
                .HasColumnName("is_delete");
            entity.Property(e => e.IsDisplayHomepage)
                .HasComment("是否在首页展示(0-不展示，1-展示)")
                .HasColumnName("is_display_homepage");
            entity.Property(e => e.LinkedUrl)
                .HasMaxLength(300)
                .HasColumnName("linked_url");
            entity.Property(e => e.NewContent)
                .HasComment("新闻正文内容")
                .HasColumnName("new_content");
            entity.Property(e => e.NewContentEnUs).HasColumnName("new_content_en_US");
            entity.Property(e => e.NewContentZhTw).HasColumnName("new_content_zh_TW");
            entity.Property(e => e.NewIntroduction)
                .HasMaxLength(255)
                .HasComment("新闻简介")
                .HasColumnName("new_introduction");
            entity.Property(e => e.NewIntroductionEnUs)
                .HasMaxLength(500)
                .HasColumnName("new_introduction_en_US");
            entity.Property(e => e.NewIntroductionZhTw)
                .HasMaxLength(255)
                .HasColumnName("new_introduction_zh_TW");
            entity.Property(e => e.NewsCardImage)
                .HasComment("新闻卡片图片")
                .HasColumnType("mediumtext")
                .HasColumnName("news_card_image");
            entity.Property(e => e.NewsTag)
                .HasMaxLength(10)
                .HasComment("新闻标签")
                .HasColumnName("news_tag");
            entity.Property(e => e.NewsTagEnUs)
                .HasMaxLength(50)
                .HasColumnName("news_tag_en_US");
            entity.Property(e => e.NewsTagZhTw)
                .HasMaxLength(10)
                .HasColumnName("news_tag_zh_TW");
            entity.Property(e => e.NewsTitle)
                .HasMaxLength(40)
                .HasComment("新闻标题")
                .HasColumnName("news_title");
            entity.Property(e => e.NewsTitleEnUs)
                .HasMaxLength(100)
                .HasColumnName("news_title_en_US");
            entity.Property(e => e.NewsTitleZhTw)
                .HasMaxLength(40)
                .HasColumnName("news_title_zh_TW")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.PublicationDate)
                .HasMaxLength(20)
                .HasComment("发表日期（yyyy-MM-DD HH-mm-SS）")
                .HasColumnName("publication_date");
            entity.Property(e => e.ReadingVolume)
                .HasComment("阅读量")
                .HasColumnName("reading_volume");
            entity.Property(e => e.UpdateDate)
                .HasMaxLength(20)
                .HasComment("更新日期（yyyy-MM-DD HH-mm-SS）")
                .HasColumnName("update_date");
        });

        modelBuilder.Entity<Order>(entity =>
        {
            entity.HasKey(e => e.OrderNo).HasName("PRIMARY");

            entity
                .ToTable("order")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.OrderNo)
                .HasMaxLength(40)
                .HasComment("订单号")
                .HasColumnName("order_no");
            entity.Property(e => e.CourseId)
                .HasComment("课程id")
                .HasColumnName("course_id");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(20)
                .HasComment("订单创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.EnrollId)
                .HasComment("报名Id")
                .HasColumnName("enrollId");
            entity.Property(e => e.OrderFee)
                .HasMaxLength(255)
                .HasComment("订单金额")
                .HasColumnName("order_fee");
            entity.Property(e => e.OrderName)
                .HasMaxLength(255)
                .HasComment("订单名称")
                .HasColumnName("order_name");
            entity.Property(e => e.OrderStatus)
                .HasMaxLength(255)
                .HasComment("订单状态（0-未支付 1-待支付 2-已支付 3-支付已取消 4- 支付失败 5-已退款）")
                .HasColumnName("order_status");
            entity.Property(e => e.PaymentTime)
                .HasMaxLength(20)
                .HasComment("支付时间")
                .HasColumnName("payment_time");
            entity.Property(e => e.UserId)
                .HasComment("支付人")
                .HasColumnName("user_id");
        });

        modelBuilder.Entity<Paper>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("paper", tb => tb.HasComment("试卷表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(55)
                .HasDefaultValueSql("''")
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("创建时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(N-标识正在使用，Y-标识被删除)")
                .HasColumnName("del");
            entity.Property(e => e.Description)
                .HasMaxLength(5000)
                .HasComment("试卷描述，考生不可见")
                .HasColumnName("description");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("生效标识：T-生效，F-不生效")
                .HasColumnName("enable");
            entity.Property(e => e.FinishFlag)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("试卷创建完成标志位 PAPER_INIT_DONE：0-未完成创建，1-完成创建")
                .HasColumnName("finish_flag");
            entity.Property(e => e.Identification)
                .HasMaxLength(4)
                .HasComment("（试卷标识）试卷类型（01-java,02-MF，03-testing）+考试语言(0-中文，1-英文)+考生是否应届（0-应届，1-已毕业）")
                .HasColumnName("identification");
            entity.Property(e => e.Instruction)
                .HasMaxLength(5000)
                .HasComment("试卷说明，考生可见")
                .HasColumnName("instruction");
            entity.Property(e => e.LeaveLimit)
                .HasDefaultValueSql("'0'")
                .HasComment("限定离开次数，超过限制即默认提交试卷(只针对限定考试总时长的情况，否则默认为0)")
                .HasColumnName("leave_limit");
            entity.Property(e => e.Name)
                .HasMaxLength(200)
                .HasDefaultValueSql("''")
                .HasComment("试卷名称")
                .HasColumnName("name");
            entity.Property(e => e.No)
                .HasMaxLength(50)
                .HasDefaultValueSql("''")
                .HasComment("试卷号（使用UUID生成）")
                .HasColumnName("no");
            entity.Property(e => e.PassLine)
                .HasDefaultValueSql("'0'")
                .HasComment("试卷及格线")
                .HasColumnName("pass_line");
            entity.Property(e => e.Property)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("试卷属性 PAPER_PROP：1-测试，2-问卷")
                .HasColumnName("property");
            entity.Property(e => e.TotalItem)
                .HasComment("总题数")
                .HasColumnName("total_item");
            entity.Property(e => e.TotalScore)
                .HasDefaultValueSql("'0'")
                .HasComment("总分值")
                .HasColumnName("total_score");
            entity.Property(e => e.TotalTime)
                .HasComment("总时长（单位min）-1表示不限制时长")
                .HasColumnName("total_time");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(55)
                .HasDefaultValueSql("''")
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("修改时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("update_time");
            entity.Property(e => e.Url)
                .HasMaxLength(100)
                .HasDefaultValueSql("''")
                .HasComment("考试链接")
                .HasColumnName("url");
            entity.Property(e => e.UseFlag)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("试卷用途标识 USE_FLAG ：1-课前测评，2-课后测评，3-通用")
                .HasColumnName("use_flag");
        });

        modelBuilder.Entity<PaperSection>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("paper_section", tb => tb.HasComment("试卷模块对应表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Order)
                .HasComment("排序：1,2,3")
                .HasColumnName("order");
            entity.Property(e => e.PaperId)
                .HasComment("试卷ID")
                .HasColumnName("paper_id");
            entity.Property(e => e.SectionId)
                .HasComment("模块ID")
                .HasColumnName("section_id");
        });

        modelBuilder.Entity<PersonAttendance>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("person_attendance", tb => tb.HasComment("用户签到表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Date)
                .HasMaxLength(20)
                .HasComment("签到日期")
                .HasColumnName("date");
            entity.Property(e => e.IpAddress)
                .HasMaxLength(20)
                .HasComment("签到IP")
                .HasColumnName("ipAddress");
            entity.Property(e => e.Latitude)
                .HasMaxLength(20)
                .HasComment("签到纬度")
                .HasColumnName("latitude");
            entity.Property(e => e.Longitude)
                .HasMaxLength(20)
                .HasComment("签到经度")
                .HasColumnName("longitude");
            entity.Property(e => e.UserId)
                .HasComment("用户ID")
                .HasColumnName("user_id");
        });

        modelBuilder.Entity<PersonPaper>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("person_paper", tb => tb.HasComment("人员试卷关联表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.PaperId)
                .HasComment("试卷id")
                .HasColumnName("paper_id");
            entity.Property(e => e.PaperNo)
                .HasMaxLength(50)
                .HasDefaultValueSql("''")
                .HasComment("试卷编号")
                .HasColumnName("paper_no")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.PlanId)
                .HasComment("班级id")
                .HasColumnName("plan_id");
            entity.Property(e => e.UserId)
                .HasComment("考生id")
                .HasColumnName("user_id");
        });

        modelBuilder.Entity<PlanPaper>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("plan_paper", tb => tb.HasComment("计划与测试对应表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键ID")
                .HasColumnName("id");
            entity.Property(e => e.ClassId)
                .HasComment("班级ID")
                .HasColumnName("class_id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除")
                .HasColumnName("del");
            entity.Property(e => e.PaperEndTime)
                .HasMaxLength(18)
                .HasComment("试卷结束时间(20150901 115959000)")
                .HasColumnName("paper_end_time");
            entity.Property(e => e.PaperId)
                .HasComment("试卷ID")
                .HasColumnName("paper_id");
            entity.Property(e => e.PaperLongTime)
                .HasMaxLength(40)
                .HasComment("试卷时长(XDXHXM)")
                .HasColumnName("paper_long_time")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.PaperNumber)
                .HasMaxLength(32)
                .HasComment("试卷编号 UUID")
                .HasColumnName("paper_number");
            entity.Property(e => e.PaperRemark)
                .HasMaxLength(1000)
                .HasComment("试卷备注")
                .HasColumnName("paper_remark");
            entity.Property(e => e.PaperStartTime)
                .HasMaxLength(18)
                .HasComment("试卷开始时间(20150901 115959000)")
                .HasColumnName("paper_start_time");
            entity.Property(e => e.PaperType)
                .HasMaxLength(1)
                .HasComment("试卷属性 1-测试，2-练习")
                .HasColumnName("paper_type");
            entity.Property(e => e.PlanId)
                .HasComment("教学计划ID")
                .HasColumnName("plan_id");
            entity.Property(e => e.Status)
                .HasMaxLength(1)
                .HasDefaultValueSql("'0'")
                .HasComment("状态 0-未布置 1-已布置")
                .HasColumnName("status");
            entity.Property(e => e.TeacherId)
                .HasDefaultValueSql("'0'")
                .HasComment("老师ID")
                .HasColumnName("teacher_id");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)")
                .HasColumnName("update_time");
            entity.Property(e => e.Url)
                .HasMaxLength(255)
                .HasComment("试卷链接")
                .HasColumnName("url");
        });

        modelBuilder.Entity<PlanPaperStuHi>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("plan_paper_stu_his", tb => tb.HasComment("作业完成情况表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => new { e.StudentId, e.PlanId, e.PlanPaperId }, "idx_paper_stu_his").IsUnique();

            entity.Property(e => e.Id)
                .HasComment("主键ID")
                .HasColumnName("id");
            entity.Property(e => e.CheckTime)
                .HasMaxLength(18)
                .HasComment("批卷时间(20150901 115959000)")
                .HasColumnName("check_time");
            entity.Property(e => e.CorrectNumber)
                .HasComment("正确题数")
                .HasColumnName("correct_number");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除")
                .HasColumnName("del");
            entity.Property(e => e.EndTime)
                .HasMaxLength(18)
                .HasComment("答卷结束时间(20150901 115959000)")
                .HasColumnName("end_time");
            entity.Property(e => e.LongTime)
                .HasMaxLength(18)
                .HasComment("答卷耗时(XDXHXM)")
                .HasColumnName("long_time");
            entity.Property(e => e.MakeUp)
                .HasDefaultValueSql("'0'")
                .HasComment("是否参加补考（0-未参加，1-已参加）")
                .HasColumnName("make_up");
            entity.Property(e => e.OperationScore)
                .HasComment("操作考分数")
                .HasColumnName("operation_score");
            entity.Property(e => e.PlanId).HasColumnName("plan_id");
            entity.Property(e => e.PlanPaperId)
                .HasComment("计划测试ID")
                .HasColumnName("plan_paper_id");
            entity.Property(e => e.Score)
                .HasComment("分数")
                .HasColumnName("score");
            entity.Property(e => e.StartTime)
                .HasMaxLength(18)
                .HasComment("答卷开始时间(20150901 115959000)")
                .HasColumnName("start_time");
            entity.Property(e => e.Status)
                .HasMaxLength(1)
                .HasDefaultValueSql("'0'")
                .HasComment("状态 0-未完成 1-已完成 2-已批阅")
                .HasColumnName("status");
            entity.Property(e => e.StudentId)
                .HasComment("学生ID（对应于sm_person中的人员）")
                .HasColumnName("student_id");
            entity.Property(e => e.TeacherId)
                .HasComment("批卷人")
                .HasColumnName("teacher_id");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<Point>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("point")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(600)
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(800)
                .HasColumnName("description_en_US");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasColumnName("enable");
            entity.Property(e => e.Name)
                .HasMaxLength(90)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(180)
                .HasColumnName("name_en_US");
            entity.Property(e => e.Order).HasColumnName("order");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<PointDetail>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("point_detail")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.PointId, "point_id");

            entity.Property(e => e.Cost)
                .HasColumnType("float(5,2)")
                .HasColumnName("cost");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(600)
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(255)
                .HasColumnName("description_en_US");
            entity.Property(e => e.FromPage).HasColumnName("from_page");
            entity.Property(e => e.Goal)
                .HasMaxLength(600)
                .HasColumnName("goal");
            entity.Property(e => e.GoalEnUs)
                .HasMaxLength(900)
                .HasColumnName("goal_en_US");
            entity.Property(e => e.MaterialContentType)
                .HasMaxLength(100)
                .HasColumnName("material_content_type");
            entity.Property(e => e.MaterialDir)
                .HasMaxLength(300)
                .HasColumnName("material_dir");
            entity.Property(e => e.MaterialFileName)
                .HasMaxLength(60)
                .HasColumnName("material_file_name");
            entity.Property(e => e.MaterialFileSize)
                .HasMaxLength(10)
                .HasColumnName("material_file_size");
            entity.Property(e => e.Part)
                .HasMaxLength(1)
                .HasColumnName("part");
            entity.Property(e => e.PointId).HasColumnName("point_id");
            entity.Property(e => e.ReferenceContentType)
                .HasMaxLength(100)
                .HasColumnName("reference_content_type");
            entity.Property(e => e.ReferenceDir)
                .HasMaxLength(300)
                .HasColumnName("reference_dir");
            entity.Property(e => e.ReferenceFileName)
                .HasMaxLength(100)
                .HasColumnName("reference_file_name");
            entity.Property(e => e.ReferenceFileSize)
                .HasMaxLength(10)
                .HasColumnName("reference_file_size");
            entity.Property(e => e.SHandbookContentType)
                .HasMaxLength(100)
                .HasColumnName("s_handbook_content_type");
            entity.Property(e => e.SHandbookDir)
                .HasMaxLength(300)
                .HasColumnName("s_handbook_dir");
            entity.Property(e => e.SHandbookFileName)
                .HasMaxLength(100)
                .HasColumnName("s_handbook_file_name");
            entity.Property(e => e.SHandbookFileSize)
                .HasMaxLength(10)
                .HasColumnName("s_handbook_file_size");
            entity.Property(e => e.THandbookContentType)
                .HasMaxLength(100)
                .HasColumnName("t_handbook_content_type");
            entity.Property(e => e.THandbookDir)
                .HasMaxLength(300)
                .HasColumnName("t_handbook_dir");
            entity.Property(e => e.THandbookFileName)
                .HasMaxLength(100)
                .HasColumnName("t_handbook_file_name");
            entity.Property(e => e.THandbookFileSize)
                .HasMaxLength(10)
                .HasColumnName("t_handbook_file_size");
            entity.Property(e => e.ToPage).HasColumnName("to_page");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasColumnName("update_time");

            entity.HasOne(d => d.Point).WithMany()
                .HasForeignKey(d => d.PointId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("point_detail_ibfk_1");
        });

        modelBuilder.Entity<Question>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("question", tb => tb.HasComment("题库"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.Analysis)
                .HasMaxLength(2000)
                .HasComment("题目解析")
                .HasColumnName("analysis");
            entity.Property(e => e.Answer)
                .HasComment("答案：主观参考，客观判题；多选题与多空填空题，答案之间用#$#来分隔")
                .HasColumnName("answer");
            entity.Property(e => e.Content)
                .HasMaxLength(12000)
                .HasDefaultValueSql("''")
                .HasComment("题干")
                .HasColumnName("content");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("创建时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("create_time");
            entity.Property(e => e.Difficulty)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("难易度 DIFFICULTY：1-易，2-中，3-难")
                .HasColumnName("difficulty");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("生效标识：T-生效，F-不生效")
                .HasColumnName("enable");
            entity.Property(e => e.Language)
                .HasMaxLength(2)
                .HasComment("考试语言(0-中文，1-英文)")
                .HasColumnName("language");
            entity.Property(e => e.Opt1)
                .HasMaxLength(300)
                .HasComment("选型内容一")
                .HasColumnName("opt1");
            entity.Property(e => e.Opt10)
                .HasMaxLength(300)
                .HasComment("选型内容十")
                .HasColumnName("opt10");
            entity.Property(e => e.Opt11)
                .HasMaxLength(300)
                .HasComment("选型内容十一")
                .HasColumnName("opt11");
            entity.Property(e => e.Opt12)
                .HasMaxLength(300)
                .HasComment("选型内容十二")
                .HasColumnName("opt12");
            entity.Property(e => e.Opt13)
                .HasMaxLength(300)
                .HasComment("选型内容十三")
                .HasColumnName("opt13");
            entity.Property(e => e.Opt14)
                .HasMaxLength(300)
                .HasComment("选型内容十四")
                .HasColumnName("opt14");
            entity.Property(e => e.Opt15)
                .HasMaxLength(300)
                .HasComment("选型内容十五")
                .HasColumnName("opt15");
            entity.Property(e => e.Opt16)
                .HasMaxLength(300)
                .HasComment("选型内容十六")
                .HasColumnName("opt16");
            entity.Property(e => e.Opt17)
                .HasMaxLength(300)
                .HasComment("选型内容十七")
                .HasColumnName("opt17");
            entity.Property(e => e.Opt18)
                .HasMaxLength(300)
                .HasComment("选型内容十八")
                .HasColumnName("opt18");
            entity.Property(e => e.Opt19)
                .HasMaxLength(300)
                .HasComment("选型内容十九")
                .HasColumnName("opt19");
            entity.Property(e => e.Opt2)
                .HasMaxLength(300)
                .HasComment("选型内容二")
                .HasColumnName("opt2");
            entity.Property(e => e.Opt20)
                .HasMaxLength(300)
                .HasComment("选型内容二十")
                .HasColumnName("opt20");
            entity.Property(e => e.Opt3)
                .HasMaxLength(300)
                .HasComment("选型内容三")
                .HasColumnName("opt3");
            entity.Property(e => e.Opt4)
                .HasMaxLength(300)
                .HasComment("选型内容四")
                .HasColumnName("opt4");
            entity.Property(e => e.Opt5)
                .HasMaxLength(300)
                .HasComment("选型内容五")
                .HasColumnName("opt5");
            entity.Property(e => e.Opt6)
                .HasMaxLength(300)
                .HasComment("选型内容六")
                .HasColumnName("opt6");
            entity.Property(e => e.Opt7)
                .HasMaxLength(300)
                .HasComment("选型内容七")
                .HasColumnName("opt7");
            entity.Property(e => e.Opt8)
                .HasMaxLength(300)
                .HasComment("选型内容八")
                .HasColumnName("opt8");
            entity.Property(e => e.Opt9)
                .HasMaxLength(300)
                .HasComment("选型内容九")
                .HasColumnName("opt9");
            entity.Property(e => e.PaperType)
                .HasMaxLength(2)
                .HasComment("试卷类型（01-java,02-MF，03-testing）")
                .HasColumnName("paper_type");
            entity.Property(e => e.Pid)
                .HasComment("英文、繁体试卷关联中文id")
                .HasColumnName("pid");
            entity.Property(e => e.Property)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("题目属性 QUST_PROP：00-练习题，01-课堂练习，02-课后练习，03-模拟练习，04-综合练习")
                .HasColumnName("property");
            entity.Property(e => e.SoFlag)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("主客标识位 QUST_SO：s-Subject主观题，o-Object客观题")
                .HasColumnName("so_flag");
            entity.Property(e => e.Type)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("题型 QUST_TYPE：1-单选，2-多选，3-判断，4-填空，5-简答，6-综合，8-日期或其他，9-排序，10-选项填空")
                .HasColumnName("type");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("修改时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("update_time");
            entity.Property(e => e.UseFlag)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("用途标识位 USE_FLAG：1-教学，2-校招，3-通用")
                .HasColumnName("use_flag");
        });

        modelBuilder.Entity<QuestionPoint>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("question_point")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.PointId)
                .HasComment("知识点ID")
                .HasColumnName("point_id");
            entity.Property(e => e.QuestionId)
                .HasComment("题目ID")
                .HasColumnName("question_id");
        });

        modelBuilder.Entity<QuestionTag>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("question_tag", tb => tb.HasComment("题目标签对应表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.QuestionId)
                .HasComment("题目ID")
                .HasColumnName("question_id");
            entity.Property(e => e.TagId)
                .HasComment("标签ID")
                .HasColumnName("tag_id");
        });

        modelBuilder.Entity<QusetionImage>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("qusetion_images", tb => tb.HasComment("试题图片扩展表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键ID\r")
                .HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人\r")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)\r")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除\r")
                .HasColumnName("del");
            entity.Property(e => e.Flag)
                .HasDefaultValueSql("'1'")
                .HasComment("有效标识 0-无效 1-有效\r")
                .HasColumnName("flag");
            entity.Property(e => e.ImageId)
                .HasMaxLength(32)
                .HasComment("图片的id(UUID)\r")
                .HasColumnName("image_id");
            entity.Property(e => e.Opt)
                .HasComment("选项 1~6对应A~F对应opt1~opt6\r")
                .HasColumnName("opt");
            entity.Property(e => e.Order)
                .HasComment("顺序 0~10\r")
                .HasColumnName("order");
            entity.Property(e => e.QuestionId)
                .HasComment("试题id\r")
                .HasColumnName("question_id");
            entity.Property(e => e.Type)
                .HasComment("类型 0:试题图片 1:选项图片\r")
                .HasColumnName("type");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人\r")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)\r")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<Refreshtoken>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("refreshtoken")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Account)
                .HasMaxLength(255)
                .HasColumnName("account");
            entity.Property(e => e.Refreshtoken1)
                .HasMaxLength(2047)
                .HasColumnName("refreshtoken");
        });

        modelBuilder.Entity<Section>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("section", tb => tb.HasComment("试卷模块表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("id主键自增")
                .HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("创建时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("create_time");
            entity.Property(e => e.Instruction)
                .HasMaxLength(2000)
                .HasComment("模块说明，考生可见")
                .HasColumnName("instruction");
            entity.Property(e => e.Name)
                .HasMaxLength(200)
                .HasDefaultValueSql("''")
                .HasComment("模块名称")
                .HasColumnName("name");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("修改时间（YYYY-MM-DD HH-mm-SS）")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<SectionQuestion>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("section_question", tb => tb.HasComment("模块与题目对应表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.IsItRequired).HasColumnName("is_it_required");
            entity.Property(e => e.Order)
                .HasComment("排序：1,2,3")
                .HasColumnName("order");
            entity.Property(e => e.QuestionId)
                .HasComment("题目ID")
                .HasColumnName("question_id");
            entity.Property(e => e.QuestionScore)
                .HasComment("题目分值")
                .HasColumnType("float(5,2)")
                .HasColumnName("question_score");
            entity.Property(e => e.SectionId)
                .HasComment("部分ID")
                .HasColumnName("section_id");
            entity.Property(e => e.ShowCondition)
                .HasMaxLength(50)
                .HasColumnName("show_condition");
            entity.Property(e => e.ShowRelation).HasColumnName("show_relation");
        });

        modelBuilder.Entity<Skill>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("skill")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(600)
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(800)
                .HasColumnName("description_en_US");
            entity.Property(e => e.DescriptionZhTw)
                .HasMaxLength(600)
                .HasColumnName("description_zh_TW");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasColumnName("enable");
            entity.Property(e => e.Level)
                .HasMaxLength(3)
                .HasColumnName("level");
            entity.Property(e => e.Name)
                .HasMaxLength(60)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(120)
                .HasColumnName("name_en_US");
            entity.Property(e => e.NameZhTw)
                .HasMaxLength(60)
                .HasColumnName("name_zh_TW");
            entity.Property(e => e.Order).HasColumnName("order");
            entity.Property(e => e.ParentId).HasColumnName("parent_id");
            entity.Property(e => e.Type)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasColumnName("type");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<SkillPoint>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("skill_point")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.PointId, "point_id");

            entity.HasIndex(e => e.SkillId, "skill_id");

            entity.Property(e => e.PointId).HasColumnName("point_id");
            entity.Property(e => e.SkillId).HasColumnName("skill_id");

            entity.HasOne(d => d.Point).WithMany()
                .HasForeignKey(d => d.PointId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("skill_point_ibfk_2");

            entity.HasOne(d => d.Skill).WithMany()
                .HasForeignKey(d => d.SkillId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("skill_point_ibfk_1");
        });

        modelBuilder.Entity<SmMenu>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("sm_menu")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(400)
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(600)
                .HasColumnName("description_en_US");
            entity.Property(e => e.DescriptionZhTw)
                .HasMaxLength(600)
                .HasColumnName("description_zh_TW");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasColumnName("enable");
            entity.Property(e => e.Level).HasColumnName("level");
            entity.Property(e => e.Name)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(60)
                .HasColumnName("name_en_US");
            entity.Property(e => e.NameZhTw)
                .HasMaxLength(60)
                .HasColumnName("name_zh_TW");
            entity.Property(e => e.Order).HasColumnName("order");
            entity.Property(e => e.ParentId).HasColumnName("parent_id");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("update_time");
            entity.Property(e => e.Url)
                .HasMaxLength(90)
                .HasColumnName("url");
        });

        modelBuilder.Entity<SmOption>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("sm_option")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.Value, "value");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("create_time");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasColumnName("enable");
            entity.Property(e => e.Level).HasColumnName("level");
            entity.Property(e => e.Name)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(60)
                .HasColumnName("name_en_US");
            entity.Property(e => e.NameZhTw)
                .HasMaxLength(40)
                .HasColumnName("name_zh_TW");
            entity.Property(e => e.Order).HasColumnName("order");
            entity.Property(e => e.ParentId).HasColumnName("parent_id");
            entity.Property(e => e.Type).HasColumnName("type");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("update_time");
            entity.Property(e => e.Value)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasColumnName("value");
        });

        modelBuilder.Entity<SmPerson>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("sm_person")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.Username, "username").IsUnique();

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Age).HasColumnName("age");
            entity.Property(e => e.Birthday)
                .HasMaxLength(8)
                .HasColumnName("birthday");
            entity.Property(e => e.Cardno)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("cardno");
            entity.Property(e => e.Cardtype)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasColumnName("cardtype");
            entity.Property(e => e.Cet4)
                .HasColumnType("float(5,2)")
                .HasColumnName("cet4");
            entity.Property(e => e.Cet6)
                .HasColumnType("float(5,2)")
                .HasColumnName("cet6");
            entity.Property(e => e.Code)
                .HasMaxLength(255)
                .HasColumnName("code");
            entity.Property(e => e.College)
                .HasMaxLength(100)
                .HasColumnName("college");
            entity.Property(e => e.ContactAddress)
                .HasMaxLength(100)
                .HasColumnName("contact_address");
            entity.Property(e => e.ContactPostcode)
                .HasMaxLength(6)
                .HasColumnName("contact_postcode");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasColumnName("create_time");
            entity.Property(e => e.Degree)
                .HasMaxLength(10)
                .HasColumnName("degree");
            entity.Property(e => e.Description)
                .HasMaxLength(1500)
                .HasColumnName("description")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Direction)
                .HasMaxLength(20)
                .HasColumnName("direction");
            entity.Property(e => e.EducationBackground)
                .HasMaxLength(20)
                .HasColumnName("education_background");
            entity.Property(e => e.Email)
                .HasMaxLength(40)
                .HasColumnName("email")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.EnName)
                .HasMaxLength(20)
                .HasColumnName("en_name");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasColumnName("enable");
            entity.Property(e => e.ExamNum)
                .HasMaxLength(45)
                .HasComment("准考证号")
                .HasColumnName("exam_num");
            entity.Property(e => e.Gender)
                .HasMaxLength(3)
                .HasDefaultValueSql("''")
                .HasColumnName("gender");
            entity.Property(e => e.Gpa)
                .HasColumnType("float(5,3)")
                .HasColumnName("gpa");
            entity.Property(e => e.HomeAddress)
                .HasMaxLength(100)
                .HasColumnName("home_address");
            entity.Property(e => e.HomePostcode)
                .HasMaxLength(6)
                .HasColumnName("home_postcode");
            entity.Property(e => e.Identification)
                .HasMaxLength(4)
                .HasComment("(试卷标识）试卷类型（01-java,02-MF，03-testing）+考试语言(0-中文，1-英文)+考生是否应届（0-应届，1-已毕业）")
                .HasColumnName("identification");
            entity.Property(e => e.Major)
                .HasMaxLength(100)
                .HasColumnName("major");
            entity.Property(e => e.Mobile)
                .HasMaxLength(11)
                .HasDefaultValueSql("''")
                .HasColumnName("mobile");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.No)
                .HasMaxLength(15)
                .HasDefaultValueSql("''")
                .HasColumnName("no");
            entity.Property(e => e.Password)
                .HasMaxLength(255)
                .HasColumnName("password");
            entity.Property(e => e.Phone)
                .HasMaxLength(20)
                .HasColumnName("phone")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Photo)
                .HasColumnType("mediumtext")
                .HasColumnName("photo");
            entity.Property(e => e.Profilepath)
                .HasMaxLength(255)
                .HasColumnName("profilepath");
            entity.Property(e => e.Resume)
                .HasMaxLength(80)
                .HasColumnName("resume");
            entity.Property(e => e.Role)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasColumnName("role");
            entity.Property(e => e.State).HasColumnName("state");
            entity.Property(e => e.StudentSource)
                .HasMaxLength(100)
                .HasComment("考生来源")
                .HasColumnName("student_source");
            entity.Property(e => e.Type)
                .HasMaxLength(2)
                .HasColumnName("type");
            entity.Property(e => e.University)
                .HasMaxLength(50)
                .HasColumnName("university");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasColumnName("update_time");
            entity.Property(e => e.Username)
                .HasMaxLength(32)
                .HasDefaultValueSql("''")
                .HasColumnName("username");
        });

        modelBuilder.Entity<SmPersonRole>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("sm_person_role")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.RoleId, "role_id");

            entity.HasIndex(e => e.UserId, "user_id");

            entity.Property(e => e.RoleId).HasColumnName("role_id");
            entity.Property(e => e.UserId).HasColumnName("user_id");

            entity.HasOne(d => d.Role).WithMany()
                .HasForeignKey(d => d.RoleId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("sm_person_role_ibfk_2");

            entity.HasOne(d => d.User).WithMany()
                .HasForeignKey(d => d.UserId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("sm_person_role_ibfk_1");
        });

        modelBuilder.Entity<SmRole>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("sm_role")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(400)
                .HasColumnName("description");
            entity.Property(e => e.DescriptionEnUs)
                .HasMaxLength(600)
                .HasColumnName("description_en_US");
            entity.Property(e => e.DescriptionZhTw)
                .HasMaxLength(400)
                .HasColumnName("description_zh_TW");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasColumnName("enable");
            entity.Property(e => e.Name)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasColumnName("name");
            entity.Property(e => e.NameEnUs)
                .HasMaxLength(60)
                .HasColumnName("name_en_US");
            entity.Property(e => e.NameZhTw)
                .HasMaxLength(40)
                .HasColumnName("name_zh_TW");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<SmRoleMenu>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("sm_role_menu")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.MenuId, "menu_id");

            entity.HasIndex(e => e.RoleId, "role_id");

            entity.Property(e => e.MenuId).HasColumnName("menu_id");
            entity.Property(e => e.RoleId).HasColumnName("role_id");

            entity.HasOne(d => d.Menu).WithMany()
                .HasForeignKey(d => d.MenuId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("sm_role_menu_ibfk_2");

            entity.HasOne(d => d.Role).WithMany()
                .HasForeignKey(d => d.RoleId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("sm_role_menu_ibfk_1");
        });

        modelBuilder.Entity<Tag>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("tag", tb => tb.HasComment("标签库"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(300)
                .HasComment("标签说明")
                .HasColumnName("description")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasDefaultValueSql("''")
                .HasComment("生效标识：T-生效，F-不生效")
                .HasColumnName("enable");
            entity.Property(e => e.Name)
                .HasMaxLength(30)
                .HasDefaultValueSql("''")
                .HasComment("标签名称")
                .HasColumnName("name");
            entity.Property(e => e.UserCount)
                .HasComment("使用次数")
                .HasColumnName("user_count");
        });

        modelBuilder.Entity<TeachPlan>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("teach_plan")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.ClassId, "class_id");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.ClassId).HasColumnName("class_id");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("create_time");
            entity.Property(e => e.EndTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("end_time");
            entity.Property(e => e.StartTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("start_time");
            entity.Property(e => e.TreeSnap)
                .HasColumnType("mediumtext")
                .HasColumnName("tree_snap")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasColumnName("update_time");

            entity.HasOne(d => d.Class).WithMany(p => p.TeachPlans)
                .HasForeignKey(d => d.ClassId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("teach_plan_ibfk_1");
        });

        modelBuilder.Entity<TeachPractice>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("teach_practice")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.PointId, "point_id");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Answer)
                .HasMaxLength(900)
                .HasColumnName("answer");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasColumnName("create_time");
            entity.Property(e => e.Description)
                .HasMaxLength(600)
                .HasColumnName("description");
            entity.Property(e => e.Dir)
                .HasMaxLength(300)
                .HasColumnName("dir");
            entity.Property(e => e.Enable)
                .HasMaxLength(2)
                .HasColumnName("enable");
            entity.Property(e => e.Level)
                .HasMaxLength(2)
                .HasColumnName("level");
            entity.Property(e => e.Option1)
                .HasMaxLength(100)
                .HasColumnName("option1");
            entity.Property(e => e.Option2)
                .HasMaxLength(100)
                .HasColumnName("option2");
            entity.Property(e => e.Option3)
                .HasMaxLength(100)
                .HasColumnName("option3");
            entity.Property(e => e.Option4)
                .HasMaxLength(100)
                .HasColumnName("option4");
            entity.Property(e => e.Option5)
                .HasMaxLength(100)
                .HasColumnName("option5");
            entity.Property(e => e.Option6)
                .HasMaxLength(100)
                .HasColumnName("option6");
            entity.Property(e => e.Order).HasColumnName("order");
            entity.Property(e => e.PointId).HasColumnName("point_id");
            entity.Property(e => e.Property)
                .HasMaxLength(2)
                .HasColumnName("property");
            entity.Property(e => e.Type)
                .HasMaxLength(2)
                .HasColumnName("type");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasColumnName("update_time");

            entity.HasOne(d => d.Point).WithMany(p => p.TeachPractices)
                .HasForeignKey(d => d.PointId)
                .HasConstraintName("teach_practice_ibfk_1");
        });

        modelBuilder.Entity<TeacherPoint>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("teacher_point")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.HasIndex(e => e.PointId, "point_id");

            entity.HasIndex(e => e.TeacherId, "teacher_id");

            entity.Property(e => e.Manage)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasColumnName("manage");
            entity.Property(e => e.PointId).HasColumnName("point_id");
            entity.Property(e => e.TeacherId).HasColumnName("teacher_id");

            entity.HasOne(d => d.Point).WithMany()
                .HasForeignKey(d => d.PointId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("teacher_point_ibfk_2");

            entity.HasOne(d => d.Teacher).WithMany()
                .HasForeignKey(d => d.TeacherId)
                .OnDelete(DeleteBehavior.ClientSetNull)
                .HasConstraintName("teacher_point_ibfk_1");
        });

        modelBuilder.Entity<TestTable>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("test_table")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Age)
                .HasComment("年龄")
                .HasColumnName("age");
            entity.Property(e => e.Enable)
                .HasMaxLength(255)
                .HasComment("状态（是否可用）")
                .HasColumnName("enable");
            entity.Property(e => e.Name)
                .HasMaxLength(255)
                .HasColumnName("name");
            entity.Property(e => e.NativePlace)
                .HasMaxLength(255)
                .HasComment("籍贯")
                .HasColumnName("nativePlace");
            entity.Property(e => e.No)
                .HasMaxLength(20)
                .HasColumnName("no");
            entity.Property(e => e.Sex)
                .HasMaxLength(255)
                .HasDefaultValueSql("'男'")
                .HasComment("性别")
                .HasColumnName("sex");
        });

        modelBuilder.Entity<TotalScore>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("total_score", tb => tb.HasComment("学生总成绩表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键ID\r")
                .HasColumnName("id");
            entity.Property(e => e.AttendanceScore)
                .HasComment("考勤分\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("attendance_score");
            entity.Property(e => e.AttitudeScore)
                .HasComment("态度分\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("attitude_score");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人\r")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)\r")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除\r")
                .HasColumnName("del");
            entity.Property(e => e.ExamScore)
                .HasComment("测试分\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("exam_score");
            entity.Property(e => e.Flag)
                .HasComment("有效标识 0-无效 1-有效\r")
                .HasColumnName("flag");
            entity.Property(e => e.NormalScore)
                .HasComment("平时分\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("normal_score");
            entity.Property(e => e.PlanId)
                .HasComment("教学计划ID\r")
                .HasColumnName("plan_id");
            entity.Property(e => e.StudentId)
                .HasComment("学生ID\r")
                .HasColumnName("student_id");
            entity.Property(e => e.TotalScore1)
                .HasComment("总分\r")
                .HasColumnType("float(5,2)")
                .HasColumnName("total_score");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人\r")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)\r")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<TotalScoreRatio>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("total_score_ratio", tb => tb.HasComment("总成绩组成加权表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键ID")
                .HasColumnName("id");
            entity.Property(e => e.AttendanceRatio)
                .HasComment("考勤成绩比例")
                .HasColumnName("attendance_ratio");
            entity.Property(e => e.AttitudeRatio)
                .HasComment("态度成绩比例")
                .HasColumnName("attitude_ratio");
            entity.Property(e => e.CreatePerson)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_person");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间(20150901 115959000)")
                .HasColumnName("create_time");
            entity.Property(e => e.Del)
                .HasMaxLength(1)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标示 Y-已删除 N-未删除")
                .HasColumnName("del");
            entity.Property(e => e.ExamRatio)
                .HasComment("最后测试成绩比例")
                .HasColumnName("exam_ratio");
            entity.Property(e => e.NormalRatio)
                .HasComment("平时成绩比例")
                .HasColumnName("normal_ratio");
            entity.Property(e => e.PlanId)
                .HasComment("教学计划ID")
                .HasColumnName("plan_id");
            entity.Property(e => e.UpdatePerson)
                .HasMaxLength(20)
                .HasComment("修改人")
                .HasColumnName("update_person");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("修改时间(20150901 115959000)")
                .HasColumnName("update_time");
        });

        modelBuilder.Entity<UnivAttn>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("univ_attn", tb => tb.HasComment("联系人信息表(UNIV_ATTN)"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键")
                .HasColumnName("id");
            entity.Property(e => e.CollegeId)
                .HasComment("学院id")
                .HasColumnName("college_id");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.CreateUser)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_user");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(Y:删除 N:正在被使用)")
                .HasColumnName("del");
            entity.Property(e => e.Email)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("联系人邮箱")
                .HasColumnName("email");
            entity.Property(e => e.Gender)
                .HasMaxLength(1)
                .HasDefaultValueSql("''")
                .HasComment("性别")
                .HasColumnName("gender");
            entity.Property(e => e.Mobile)
                .HasMaxLength(11)
                .HasDefaultValueSql("''")
                .HasComment("联系人手机")
                .HasColumnName("mobile");
            entity.Property(e => e.Name)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("联系人名")
                .HasColumnName("name");
            entity.Property(e => e.Phone)
                .HasMaxLength(15)
                .HasDefaultValueSql("''")
                .HasComment("联系人座机")
                .HasColumnName("phone");
            entity.Property(e => e.Position)
                .HasMaxLength(50)
                .HasDefaultValueSql("''")
                .HasComment("职务")
                .HasColumnName("position");
            entity.Property(e => e.UnivBranchId)
                .HasComment("分校id")
                .HasColumnName("univ_branch_id");
            entity.Property(e => e.UnivId)
                .HasComment("学校id")
                .HasColumnName("univ_id");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("更新时间")
                .HasColumnName("update_time");
            entity.Property(e => e.UpdateUser)
                .HasMaxLength(20)
                .HasComment("更新人")
                .HasColumnName("update_user");
        });

        modelBuilder.Entity<UnivCollege>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("univ_college", tb => tb.HasComment("学院信息表(UNIV_COLLEGE)"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键")
                .HasColumnName("id");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.CreateUser)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_user");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(Y:删除 N:正在被使用)")
                .HasColumnName("del");
            entity.Property(e => e.Name)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("学院名称")
                .HasColumnName("name");
            entity.Property(e => e.UnivId)
                .HasComment("学校id")
                .HasColumnName("univ_id");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("更新时间")
                .HasColumnName("update_time");
            entity.Property(e => e.UpdateUser)
                .HasMaxLength(20)
                .HasComment("更新人")
                .HasColumnName("update_user");
        });

        modelBuilder.Entity<UnivCoop>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("univ_coop", tb => tb.HasComment("合作信息表(UNIV_COOP)"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键")
                .HasColumnName("id");
            entity.Property(e => e.City)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("市")
                .HasColumnName("city");
            entity.Property(e => e.CollegeId)
                .HasComment("学院id")
                .HasColumnName("college_id");
            entity.Property(e => e.CompanyName)
                .HasMaxLength(100)
                .HasDefaultValueSql("''")
                .HasComment("公司名称")
                .HasColumnName("company_name");
            entity.Property(e => e.CoopTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("合作时间")
                .HasColumnName("coop_time");
            entity.Property(e => e.Country)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("国家")
                .HasColumnName("country");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.CreateUser)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_user");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(Y:删除 N:正在被使用)")
                .HasColumnName("del");
            entity.Property(e => e.Province)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("省")
                .HasColumnName("province");
            entity.Property(e => e.RecruitEmail)
                .HasMaxLength(30)
                .HasComment("招生状态 COOP_RECRU_STATE (1-已经校招 2-暂不跟进)—>改为招生邮箱")
                .HasColumnName("recruit_email")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.RecruitTime)
                .HasMaxLength(30)
                .HasComment("招生时间")
                .HasColumnName("recruit_time");
            entity.Property(e => e.Remark)
                .HasMaxLength(100)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.Status)
                .HasMaxLength(2)
                .HasComment("合作状态 COOP_STATE ( 1-合作中 2-待合作)")
                .HasColumnName("status");
            entity.Property(e => e.Style)
                .HasMaxLength(2)
                .HasComment("合作方式 COOP_WAY ( 1-课程嵌入 2-学分置换 3-定制班级 4-虚拟银行 5-校园招聘 6-其它合作)")
                .HasColumnName("style");
            entity.Property(e => e.UnivBranchId)
                .HasComment("分校id")
                .HasColumnName("univ_branch_id");
            entity.Property(e => e.UnivId)
                .HasComment("学校id")
                .HasColumnName("univ_id");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("更新时间")
                .HasColumnName("update_time");
            entity.Property(e => e.UpdateUser)
                .HasMaxLength(20)
                .HasComment("更新人")
                .HasColumnName("update_user");
        });

        modelBuilder.Entity<UnivCoopAttn>(entity =>
        {
            entity
                .HasNoKey()
                .ToTable("univ_coop_attn", tb => tb.HasComment("合作联系人对应表"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.AttnId)
                .HasComment("联系人ID")
                .HasColumnName("attn_id");
            entity.Property(e => e.CoopId)
                .HasComment("合作ID")
                .HasColumnName("coop_id");
        });

        modelBuilder.Entity<UnivCoopHistory>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("univ_coop_history")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键自增长")
                .HasColumnName("id");
            entity.Property(e => e.Contacts)
                .HasMaxLength(100)
                .HasColumnName("contacts")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.CoopId)
                .HasComment("合作编号")
                .HasColumnName("coop_id");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.CreateUser)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_user");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasComment("删除标记")
                .HasColumnName("del");
            entity.Property(e => e.Remark)
                .HasMaxLength(100)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.Status)
                .HasMaxLength(2)
                .HasComment("状态")
                .HasColumnName("status");
            entity.Property(e => e.Time)
                .HasMaxLength(18)
                .HasComment("改变状态时间")
                .HasColumnName("time");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("更新时间")
                .HasColumnName("update_time");
            entity.Property(e => e.UpdateUser)
                .HasMaxLength(20)
                .HasComment("更新人")
                .HasColumnName("update_user");
        });

        modelBuilder.Entity<UnivWorkHist>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("univ_work_hist", tb => tb.HasComment("工作历史信息表(UNIV_WORK_HIST)"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键")
                .HasColumnName("id");
            entity.Property(e => e.CollegeId)
                .HasComment("学院id")
                .HasColumnName("college_id");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasComment("创建时间")
                .HasColumnName("create_time");
            entity.Property(e => e.CreateUser)
                .HasMaxLength(20)
                .HasComment("创建人")
                .HasColumnName("create_user");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(Y:删除 N:正在被使用)")
                .HasColumnName("del");
            entity.Property(e => e.OpStatus)
                .HasMaxLength(2)
                .HasComment("执行状态 OP_STATE (1-已完成 2-未完成)")
                .HasColumnName("op_status");
            entity.Property(e => e.OpTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("操作时间")
                .HasColumnName("op_time");
            entity.Property(e => e.OpUserName)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("操办人名")
                .HasColumnName("op_user_name");
            entity.Property(e => e.Remark)
                .HasMaxLength(100)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.UnivBranchId)
                .HasComment("分校id")
                .HasColumnName("univ_branch_id");
            entity.Property(e => e.UnivId)
                .HasComment("学校ID")
                .HasColumnName("univ_id");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasComment("更新时间")
                .HasColumnName("update_time");
            entity.Property(e => e.UpdateUser)
                .HasMaxLength(20)
                .HasComment("更新人")
                .HasColumnName("update_user");
            entity.Property(e => e.WorkContent)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("工作内容")
                .HasColumnName("work_content");
        });

        modelBuilder.Entity<University>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("university", tb => tb.HasComment("学校信息表(UNIVERSITY)"))
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_unicode_ci");

            entity.Property(e => e.Id)
                .HasComment("主键")
                .HasColumnName("id");
            entity.Property(e => e.City)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("市")
                .HasColumnName("city");
            entity.Property(e => e.Country)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("国家")
                .HasColumnName("country");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("创建时间")
                .HasColumnName("create_time")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.CreateUser)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("创建人")
                .HasColumnName("create_user")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Del)
                .HasMaxLength(2)
                .HasDefaultValueSql("'N'")
                .HasComment("删除标志字段(Y:删除 N:正在被使用)")
                .HasColumnName("del")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.DetailAddr)
                .HasMaxLength(100)
                .HasDefaultValueSql("''")
                .HasComment("详细地址")
                .HasColumnName("detail_addr")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Email)
                .HasMaxLength(20)
                .HasComment("邮箱")
                .HasColumnName("email");
            entity.Property(e => e.Name)
                .HasMaxLength(40)
                .HasDefaultValueSql("''")
                .HasComment("学校名称")
                .HasColumnName("name");
            entity.Property(e => e.ParentId)
                .HasDefaultValueSql("'0'")
                .HasComment("父级id")
                .HasColumnName("parent_id");
            entity.Property(e => e.Phone)
                .HasMaxLength(20)
                .HasComment("电话")
                .HasColumnName("phone");
            entity.Property(e => e.Province)
                .HasMaxLength(10)
                .HasDefaultValueSql("''")
                .HasComment("省")
                .HasColumnName("province");
            entity.Property(e => e.Quality)
                .HasMaxLength(2)
                .HasDefaultValueSql("'5'")
                .HasComment("学校性质（UNIV_PROP 1-公办 2-民办 3-独立学院 4-培训机构 5-其它）")
                .HasColumnName("quality");
            entity.Property(e => e.Type)
                .HasMaxLength(2)
                .HasDefaultValueSql("'6'")
                .HasComment("学校层次( UNIV_LEVEL 1-985 2-211 3-本科 4-专科 5-中专 6-其它 )")
                .HasColumnName("type");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(18)
                .HasDefaultValueSql("''")
                .HasComment("更新时间")
                .HasColumnName("update_time")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.UpdateUser)
                .HasMaxLength(20)
                .HasDefaultValueSql("''")
                .HasComment("更新人")
                .HasColumnName("update_user")
                .UseCollation("utf8mb3_general_ci");
            entity.Property(e => e.Website)
                .HasMaxLength(30)
                .HasComment("网址")
                .HasColumnName("website");
        });

        modelBuilder.Entity<UserPaperAnswer>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("user_paper_answer")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.HasIndex(e => new { e.Userid, e.Planid, e.Paperid, e.Sectionorder, e.Questionorder }, "idx_user_answer_question").IsUnique();

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Answer)
                .HasMaxLength(4000)
                .HasComment("考生答案")
                .HasColumnName("answer");
            entity.Property(e => e.Createdatetime)
                .HasColumnType("datetime")
                .HasColumnName("createdatetime");
            entity.Property(e => e.Markingperson)
                .HasMaxLength(255)
                .HasComment("阅卷人，系统或人")
                .HasColumnName("markingperson");
            entity.Property(e => e.Modifydatetime)
                .HasDefaultValueSql("CURRENT_TIMESTAMP")
                .HasColumnType("datetime")
                .HasColumnName("modifydatetime");
            entity.Property(e => e.Operatorid)
                .HasMaxLength(255)
                .HasColumnName("operatorid");
            entity.Property(e => e.Paperid)
                .HasComment("试卷id")
                .HasColumnName("paperid");
            entity.Property(e => e.Planid)
                .HasComment("教学计划id")
                .HasColumnName("planid");
            entity.Property(e => e.Questionorder)
                .HasComment("试卷小题题号顺序")
                .HasColumnName("questionorder");
            entity.Property(e => e.Score)
                .HasComment("得分分数")
                .HasColumnType("float(5,2)")
                .HasColumnName("score");
            entity.Property(e => e.Sectionorder)
                .HasComment("试卷大题题号顺序")
                .HasColumnName("sectionorder");
            entity.Property(e => e.Userid)
                .HasComment("用户id")
                .HasColumnName("userid");
        });

        modelBuilder.Entity<UserPaperQuestionSeq>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("user_paper_question_seq")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.HasIndex(e => new { e.Userid, e.Planid, e.Paperid, e.Sectionorder, e.Questionorder }, "idx_user_answer_question").IsUnique();

            entity.Property(e => e.Id).HasColumnName("id");
            entity.Property(e => e.Createdatetime)
                .HasColumnType("datetime")
                .HasColumnName("createdatetime");
            entity.Property(e => e.Modifydatetime)
                .HasDefaultValueSql("CURRENT_TIMESTAMP")
                .HasColumnType("datetime")
                .HasColumnName("modifydatetime");
            entity.Property(e => e.Operatorid)
                .HasMaxLength(255)
                .HasColumnName("operatorid");
            entity.Property(e => e.Paperid)
                .HasComment("试卷id")
                .HasColumnName("paperid");
            entity.Property(e => e.Planid)
                .HasComment("教学计划id")
                .HasColumnName("planid");
            entity.Property(e => e.Questionorder)
                .HasComment("试卷小题题号顺序")
                .HasColumnName("questionorder");
            entity.Property(e => e.Sectionorder)
                .HasComment("试卷大题题号顺序")
                .HasColumnName("sectionorder");
            entity.Property(e => e.Userid)
                .HasComment("用户id")
                .HasColumnName("userid");
            entity.Property(e => e.Userquestionorder)
                .HasComment("用户看到的题号顺序")
                .HasColumnName("userquestionorder");
        });

        modelBuilder.Entity<Verifycode>(entity =>
        {
            entity.HasKey(e => e.Cellphone).HasName("PRIMARY");

            entity
                .ToTable("verifycode")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.Property(e => e.Cellphone)
                .HasComment("手机号码")
                .HasColumnName("cellphone");
            entity.Property(e => e.Verifycode1)
                .HasMaxLength(6)
                .HasComment("验证码")
                .HasColumnName("verifycode");
        });

        modelBuilder.Entity<VideoCourse>(entity =>
        {
            entity.HasKey(e => e.Id).HasName("PRIMARY");

            entity
                .ToTable("video_course")
                .HasCharSet("utf8mb3")
                .UseCollation("utf8mb3_general_ci");

            entity.Property(e => e.Id)
                .HasComment("id自增主键")
                .HasColumnName("id");
            entity.Property(e => e.ClassBeginsId)
                .HasComment("开课Id")
                .HasColumnName("classBeginsId");
            entity.Property(e => e.CourseId)
                .HasComment("课程Id")
                .HasColumnName("courseId");
            entity.Property(e => e.CreateTime)
                .HasMaxLength(255)
                .HasComment("创建时间")
                .HasColumnName("createTime");
            entity.Property(e => e.Creator)
                .HasMaxLength(50)
                .HasComment("创建人")
                .HasColumnName("creator");
            entity.Property(e => e.Del)
                .HasComment("是否删除")
                .HasColumnName("del");
            entity.Property(e => e.FileAddress)
                .HasComment("文件地址")
                .HasColumnType("blob")
                .HasColumnName("fileAddress");
            entity.Property(e => e.FileName)
                .HasMaxLength(255)
                .HasComment("文件名")
                .HasColumnName("fileName");
            entity.Property(e => e.FileType)
                .HasMaxLength(255)
                .HasComment("文件类型")
                .HasColumnName("fileType");
            entity.Property(e => e.Remark)
                .HasMaxLength(4000)
                .HasComment("备注")
                .HasColumnName("remark");
            entity.Property(e => e.UpdateTime)
                .HasMaxLength(255)
                .HasComment("更新时间")
                .HasColumnName("updateTime");
            entity.Property(e => e.Updator)
                .HasMaxLength(50)
                .HasComment("更新人")
                .HasColumnName("updator");
        });

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
